# vim: syntax=make
# ifeq ($(TERM), cygwin)
# 	export LDFLAGS		:= -m i386pe
# else
# 	export LDFLAGS		:= -m elf_i386
# endif
OBJ_PATH := ../bochs
INCLUDEPATH := $(TOPDIR)
TESTINCLUDEPATH := $(INCLUDEPATH)
SRCPATH := $(TOPDIR)
OPTIMIZATION_FLAG := -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -fno-merge-constants -nostdinc -nostdlib
DEBUG := true
ifeq ($(strip $(DEBUG)), true)
	ASFLAGS			:= -ggdb -Werror -Wall -nostdinc -nostdlib
	CXXFLAGS := $(CXXFLAGS) -ggdb -Werror -Wall -march=i686 -fkeep-inline-functions -nostdinc -nostdlib
	CFLAGS := $(CFLAGS) -ggdb -Werror -Wall -march=i686 -nostdinc -nostdlib
	TESTCXXFLAGS	:= $(CXXFLAGS)
else
	ASFLAGS			:= $(OPTIMIZATION_FLAG)
	CXXFLAGS		:= $(OPTIMIZATION_FLAG)
	CFLAGS			:= $(OPTIMIZATION_FLAG)
endif
